package ar.com.spsolutions.splibrary.validation.rules;

import ar.com.spsolutions.splibrary.validation.rules.exception.ValidationException;

public abstract class ValidationRule {

    protected abstract void apply(Object... objects);

    protected void invalidate(final String message) {
        throw new ValidationException(message);
    }

    protected void invalidate(final Throwable cause) {
        throw new ValidationException(cause);
    }

    protected void invalidate(final String message, final Throwable cause) {
        throw new ValidationException(message, cause);
    }
}
